package com.jumi.microservice.dto.reissue;

import com.jumi.microservice.common.base.dto.BaseRequest;
import com.jumi.microservice.common.exception.BaseException;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author Scw
 * @Date 2020-08-10 15:33
 */
public class ExportReplacementListRequest extends BaseRequest {
    @ApiModelProperty("换货状态: 0-待审核 1-已通过 2-已拒绝 3-已取消")
    private Byte reissueStatus;
    @ApiModelProperty("换货原因: 0-做单/登记失误 1-仓储发货原因 2-快递原因 3-产品原因 4-顾客自身原因")
    private Byte reissueReason;
    @ApiModelProperty("供货商类型：1-供货商 2-仓库")
    private Byte supplierType;
    @ApiModelProperty("供货商ID")
    private Integer supplierId;
    @ApiModelProperty("商品名称")
    private String goodsName;
    @ApiModelProperty("原订单号")
    private String originalOrderNo;
    @ApiModelProperty("手机号类型：1-购买人手机号 2-收件人手机号")
    private Byte phoneType;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty(value = "批量ID , 逗号分割字符串")
    private String idStr;

    public Byte getReissueStatus() {
        return reissueStatus;
    }

    public void setReissueStatus(Byte reissueStatus) {
        this.reissueStatus = reissueStatus;
    }

    public Byte getReissueReason() {
        return reissueReason;
    }

    public void setReissueReason(Byte reissueReason) {
        this.reissueReason = reissueReason;
    }

    public Byte getSupplierType() {
        return supplierType;
    }

    public void setSupplierType(Byte supplierType) {
        this.supplierType = supplierType;
    }

    public Integer getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Integer supplierId) {
        this.supplierId = supplierId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getOriginalOrderNo() {
        return originalOrderNo;
    }

    public void setOriginalOrderNo(String originalOrderNo) {
        this.originalOrderNo = originalOrderNo;
    }

    public Byte getPhoneType() {
        return phoneType;
    }

    public void setPhoneType(Byte phoneType) {
        this.phoneType = phoneType;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIdStr() {
        return idStr;
    }

    public void setIdStr(String idStr) {
        this.idStr = idStr;
    }

    @Override
    public void checkRequest() {
        if (
                this.reissueStatus == null && this.reissueReason == null && this.supplierType == null && this.supplierId == null && this.goodsName == null && this.originalOrderNo == null && this.phoneType == null && this.phone == null && this.idStr == null
        ) {
            throw new BaseException(500, "请先选择搜索条件");
        }
    }
}